//导入路由
import { createRouter, createWebHashHistory } from 'vue-router'
import { Edit } from 'vxe-table'
const MyCourse = () => import('/src/views/teacher/MyCourse.vue')
const MyTeam = () => import('/src/views/teacher/MyTeam.vue')
const PersonalData = () => import ('/src/views/teacher/PersonalData.vue' )
const AddCourse = ()=>import('/src/views/teacher/AddCourse.vue')
const EditCourseInfo = ()=>import('/src/views/teacher/EditCourseInfo.vue')
const ManageStudentTeam = ()=>import('/src/views/teacher/myTeam/ManageStudentTeam.vue')
const ManageStudent = ()=>import('/src/views/teacher/myTeam/ManageStudent.vue')
const PracticeLog = ()=>import('/src/views/teacher/myTeam/PracticeLog.vue')
const ManageTeamGrades = ()=>import('/src/views/teacher/myTeam/ManageTeamGrades.vue')

// 定义路由
const routes = [
  // 教师界面的两个功能
  {
    // 我的课程
    path: '/MyCourse',
    name: 'MyCourse',
    component: MyCourse,
  },
  {
    // 我的团队
    path: '/MyTeam',
    name: 'MyTeam',
    component: MyTeam
  },
  {
    //用户信息
    path: '/PersonalData',
    component: PersonalData
  },
  {
    //默认路由是我的课程
    path: '/',
    redirect: '/MyCourse',    //重定向，默认路由
    props: true
  },
  {
    //添加课程
    path: '/AddCourse',
    component: AddCourse
  },
  {
    // 编辑课程
    path: '/EditCourseInfo/:cid',
    component: EditCourseInfo
  },
  {
    //管理学生团队详情页面
    path: '/ManageStudentTeam',
    component: ManageStudentTeam
  },
  {
    //管理学生个人详情页面
    path: '/ManageStudent/:rid',
    component: ManageStudent
  },
  {
    //查看实践日志
    path: '/PracticeLog/:lid',
    component: PracticeLog
  },
  {
    //成绩概览
    path: '/ManageTeamGrades',
    component: ManageTeamGrades
  }
]
const router = createRouter({
  history: createWebHashHistory(),
  routes: routes
})
export default router